package com.panfeng.xcloud.common.core.enums;

public enum SystemInnerTypeEnum {
    FIRST_OPEN(0, "初次开仓"),
    ADD_OPEN(1, "自动补仓"),
    HAND_CLEAR(2, "手动清仓"),
    WIN_AUTO_CLEAR(3, "盈利自动清仓"),
    STOP_LOSS_AUTO_CLEAR(4, "收盘价到达移动成本线清仓"),
    SPEED_RATE_TO_FAST_AUTO_CLEAR(5, "行情剧烈波动清仓"),
    TOTAL_STOP_LOSS_NUM_LIMIT_ADD_NUM(6, "总体止损次数限制风控自动清仓"),
    GET_OFF_TIME_EXPIRE(7, "快进快出解套风控自动清仓"),
    PRICE_RATE_SPEED_TOO_BIG(8, "涨跌幅剧烈波动加入对冲仓"),
    BIG_POSITION_OFF_SET(9, "对冲线后补仓加入对冲仓"),
    OFF_SET_STOP_PROFIT(10, "对冲仓止盈"),
    OFF_SET_STOP_LOSS(11, "对冲仓止损"),
    ANTI_WIN_AUTO_CLEAR(12, "加仓盈利自动清仓"),
    ANTI_ADD_OPEN(13, "自动加仓"),
    OPEN_POSITION(14, "开仓"),
    KDJ_DOWN_AUTO_CLEAR(15, "KDJ死叉自动清仓"),
    KDJ_RISE_AUTO_CLEAR(16, "KDJ金叉自动清仓"),
    MA_DOWN_AUTO_CLEAR(17, "多单MA均线走平,自动清仓"),
    MA_RISE_AUTO_CLEAR(18, "空单MA均线走平,自动清仓"),
    BUY_DEVIATE_AUTO_CLEAR(19, "多单均值偏离过大,自动清仓"),
    SELL_DEVIATE_AUTO_CLEAR(20, "空单均值偏离过大,自动清仓"),
    QUICK_AUTO_CLEAR(21, "有过加仓，行情回调快速清仓"),
    ACHIEVE_WIN_CLEAR(22, "曾达到过止盈幅度，涨幅回调，快速清仓"),
    ACHIEVE_BREAK_EVEN_CLEAR(23, "曾达到过保本涨幅，涨幅回调，保本清仓"),
    ACHIEVE_BREAK_EVEN2_CLEAR(24, "曾达到过保本涨幅2，涨幅回调，保本清仓"),
    BIG_WIN_CLEAR(25, "大幅盈利，回调清仓"),
    MA_GLOD_CROSS_AUTO_CLEAR(26, "MA金叉自动平空"),
    MA_DEATH_CROSS_AUTO_CLEAR(27, "MA死叉自动平多"),
    MAX_STOP_LOSS_CLEAR(28, "单笔极限止损清仓"),
    MAX_TODAY_PROFIT_STOP_LOSS_CLEAR(29, "今日总浮动盈亏到达亏损极限值平仓"),
    STOP_LOSS_INIT_AUTO_CLEAR(30, "收盘价到达初始止损线清仓止损"),
    POSITION_AMOUNT_NOT_EQUAL(31, "交易所持仓额和服务记录持仓额不一致纠错清仓"),
    ;
    public int code;
    public String info;

    SystemInnerTypeEnum(int code, String info) {
        this.code = code;
        this.info = info;
    }

    public static SystemInnerTypeEnum getByValue(Integer value) {
        for (SystemInnerTypeEnum code : values()) {
            if (code.getCode() == (value)) {
                return code;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
}
